package com.zhongshengnetwork.rightbe.common;

import android.app.Activity;
import android.content.Intent;

import com.zhongshengnetwork.rightbe.CustomApplication;
import com.zhongshengnetwork.rightbe.MainActivity;

/**
 * Created by luojingxing on 2019/1/15.
 */

public class AppUtils {

    public static final int STATUS_FORCE_KILLED = -1;//应用在后台被强杀了
    public static final int STATUS_NORMAL = 2; //APP正常态
    public static final String START_LAUNCH_ACTION = "start_launch_action";

    private int appStatus = STATUS_FORCE_KILLED; //默认为被后台回收了
    private boolean userAgreeStatus = false;//用户是否授权了
    private static AppUtils appStatusManager;

    public static final String KEY_HOME_ACTION="key_home_action";//返回到主页面
    public static final int ACTION_RESTART_APP= 9 ;//重启应用
    public static final int ACTION_LOGOUT = 10;//登录过期

    public static AppUtils getInstance() {
        if (appStatusManager == null) {
            appStatusManager = new AppUtils();
        }
        return appStatusManager;
    }

    public int getAppStatus() {
        return appStatus;
    }

    public void setAppStatus(int appStatus) {
        this.appStatus = appStatus;
    }

    public boolean isUserAgreeStatus() {
        return userAgreeStatus;
    }

    public void setUserAgreeStatus(boolean userAgreeStatus) {
        this.userAgreeStatus = userAgreeStatus;
    }

}

